<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="./js/ctx.js"></script>
</head>
<body>
<div id="cesiumContainer">
</div>
<script>
    var initCesium = new InitCesium();
    var viewer = initCesium.initViewer('cesiumContainer',{
        shouldAnimate : true
    });
    var czml = [{
        "id" : "document",
        "name" : "CZML Model",
        "version" : "1.0",
        "clock": {
            "interval": "2015-01-01T00:00:00Z/2015-01-01T00:00:20Z",
            "currentTime": "2015-01-01T00:00:00Z",
            "multiplier": 20
        }
    }, {
        "id" : "model",
        "position" : {
            "cartographicDegrees" : [-77, 37, 100000]
        },
        "viewFrom" : {
            "cartesian" : [4.3, 0.1, 2.6]
        },
        "model": {
            "gltf" : "../data/models/CesiumMan/Cesium_Man.glb",
            "runAnimations": false,
            "nodeTransformations": {
                "Skeleton_arm_joint_L__3_": {
                    "rotation": {
                        "epoch": "2015-01-01T00:00:00Z",
                        "unitQuaternion":[
                            0,-0.7762877147481148, -0.16428915803853994, 0.3706585477262082, 0.482699386243276,
                            10,-0.6840422631464792, -0.40211904424847345, 0.05175867757399086, 0.6063888981321548,
                            20,-0.7762877147481148, -0.16428915803853994, 0.3706585477262082, 0.482699386243276
                        ]
                    }
                },
                "Skeleton_arm_joint_R__2_": {
                    "rotation": {
                        "unitQuaternion": [
                            0.31933321618140015, 0.5055578277509731, -0.5903490075872426, 0.5421490838170975
                        ]
                    }
                }
            }
        }
    }];

    var dataSourcePromise = viewer.dataSources.add(Cesium.CzmlDataSource.load(czml));

    dataSourcePromise.then(function(dataSource){
        viewer.trackedEntity = dataSource.entities.getById('model');
    }).otherwise(function(error){
        window.alert(error);
    });



</script>
</body>
</html>